Color date dumper
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
while (true)
{
switch (int.Parse(new Random().GetHashCode().ToString().Substring(0, 1)))
{
case 1:
Console.ForegroundColor = ConsoleColor.Blue;
break;
case 2:
Console.ForegroundColor = ConsoleColor.Red;
break;
case 3:
Console.ForegroundColor = ConsoleColor.Green;
break;
case 4:
Console.ForegroundColor = ConsoleColor.Yellow;
break;
case 5:
Console.ForegroundColor = ConsoleColor.Magenta;
break;
case 6:
Console.ForegroundColor = ConsoleColor.Gray;
break;
case 7:
Console.ForegroundColor = ConsoleColor.Cyan;
break;
case 8:
Console.ForegroundColor = ConsoleColor.DarkCyan;
break;
case 9:
Console.ForegroundColor = ConsoleColor.DarkGreen;
break;
default:
Console.ForegroundColor = ConsoleColor.White;
break;
}
Console.WriteLine($"This is our date and time: {DateTime.Now}");
Console.WriteLine($"{System.Threading.Thread.CurrentThread.CurrentCulture}");
System.Threading.Thread.Sleep(1000);
}
}
}
}